package com.czxy.domain;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Id;
import javax.persistence.Table;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "orders")
public class Order {

    @Id
    private String oid;
    private Date ordertime;
    private Double totalPrice;
    private Integer state;
    private String address;
    private String name;
    private String telephone;
    private String uid;

    // 一个订单 要对应 多个订单项
    private List<OrderItem> itemList = new ArrayList<>();
}
